package com.zxy.ziems.server.dto;

import com.zxy.ziems.server.device.pojo.dto.DevicePropertyDTO;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Null;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 分类关联设备
 * @author 10348359
 * @create 2024-03-29 23:58
 */
@Data
public class ClassifyDevicePropertyDTO {

    /**
     * 主键ID
     */
    @Null(message = "主键必须为空", groups = {Add.class})
    @NotBlank(message = "主键不能为空", groups = {Delete.class, Update.class})
    private String id;

    /**
     * 分类id
     */
    @NotBlank(message = "分类Id不能为空", groups = {Delete.class, Update.class})
    private String classifyId;

    /**
     * 设备id
     */
    @NotBlank(message = "设备Id不能为空", groups = {Add.class, Update.class})
    private String deviceId;

    /**
     * 设备类型
     */
    private String deviceType;

    /**
     * 设备参数Id
     */
    @NotBlank(message = "设备参数不能为空", groups = {Add.class, Update.class})
    private String devicePropertyId;

    /**
     * 倍率 系数
     */
    private BigDecimal multiple;

    /**
     * 计算方式：1.实时值，2.增量值 3.辅助计算值
     */
    private Integer calculateType;

    /**
     * 计算公式
     */
    private String calculateFunction;

    public interface Add{}
    public interface Update{}
    public interface Delete {}
}
